<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>后台首页</title>
    <style type="text/css">
        /* 全局样式 */
        :root {
            --primary-color: #3B82F6;
            --secondary-color: #1D4ED8;
            --accent-color: #F97316;
            --dark-color: #1E293B;
            --light-color: #F8FAFC;
            --success-color: #10B981;
            --warning-color: #F59E0B;
            --danger-color: #EF4444;
            --text-main: #1E293B;
            --text-secondary: #475569;
            --text-placeholder: #94A3B8;
            --border-color: #E2E8F0;
            --card-bg: #FFFFFF;
            --sidebar-bg: #0F172A;
            --sidebar-active: #1E40AF;
        }

        body {
            font-family: 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
            background-color: var(--light-color);
            background-image: linear-gradient(120deg, rgba(248, 250, 252, 0.8), rgba(230, 236, 242, 0.8));
            color: var(--text-main);
            margin: 0;
            padding: 20px;
            line-height: 1.5;
            height: 100%;
            box-sizing: border-box;
        }

        /* 卡片样式 */
        .card {
            background-color: var(--card-bg);
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
            padding: 20px;
            margin-bottom: 20px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .card:hover {
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            transform: translateY(-5px);
        }

        /* 标题样式 */
        .card-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
        }

        .card-title i {
            margin-right: 8px;
            font-size: 18px;
        }

        /* 内容样式 */
        .card-body {
            padding: 12px 0;
        }

        .info-row {
            display: flex;
            margin-bottom: 16px;
            flex-wrap: wrap;
            align-items: center;
        }

        .info-label {
            width: 120px;
            font-weight: 500;
            color: var(--text-secondary);
        }

        .info-value {
            flex: 1;
            color: var(--text-main);
            font-size: 15px;
        }

        /* 欢迎信息样式 */
        .welcome-card {
            text-align: center;
            padding: 30px 20px;
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(29, 78, 216, 0.05));
            border: 1px solid rgba(59, 130, 246, 0.1);
        }

        .welcome-title {
            font-size: 28px;
            font-weight: bold;
            color: var(--primary-color);
            margin-bottom: 12px;
            animation: fadeIn 1s ease-in-out;
        }

        .welcome-desc {
            font-size: 16px;
            color: var(--text-secondary);
            margin-bottom: 24px;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        /* 统计卡片样式 */
        .stats-container {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            margin-top: 24px;
        }

        .stat-card {
            flex: 1;
            min-width: 220px;
            background-color: var(--card-bg);
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
            text-align: center;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border-top: 4px solid var(--primary-color);
        }

        .stat-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
        }

        .stat-icon {
            font-size: 40px;
            margin-bottom: 15px;
            color: var(--primary-color);
            transition: all 0.3s ease;
        }

        .stat-card:hover .stat-icon {
            transform: scale(1.1);
        }

        .stat-value {
            font-size: 28px;
            font-weight: bold;
            margin-bottom: 8px;
            color: var(--text-main);
        }

        .stat-label {
            font-size: 14px;
            color: var(--text-secondary);
            font-weight: 500;
        }

        /* 功能卡片样式 */
        .features-container {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            margin-top: 30px;
        }

        .feature-card {
            flex: 1;
            min-width: 220px;
            background-color: var(--card-bg);
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            text-align: center;
        }

        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        .feature-icon {
            font-size: 36px;
            margin-bottom: 15px;
            color: var(--secondary-color);
        }

        .feature-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--text-main);
        }

        .feature-desc {
            font-size: 14px;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        /* 动画效果 */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }

        @keyframes slideInLeft {
            from { transform: translateX(-30px); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        @keyframes slideInRight {
            from { transform: translateX(30px); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        /* 延迟动画 */
        .stat-card:nth-child(1) {
            animation: slideInLeft 0.5s ease-out 0.1s both;
        }

        .stat-card:nth-child(2) {
            animation: slideInLeft 0.5s ease-out 0.2s both;
        }

        .stat-card:nth-child(3) {
            animation: slideInLeft 0.5s ease-out 0.3s both;
        }

        .feature-card:nth-child(1) {
            animation: slideInRight 0.5s ease-out 0.1s both;
        }

        .feature-card:nth-child(2) {
            animation: slideInRight 0.5s ease-out 0.2s both;
        }

        .feature-card:nth-child(3) {
            animation: slideInRight 0.5s ease-out 0.3s both;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .info-row {
                flex-direction: column;
                align-items: flex-start;
            }

            .info-label {
                margin-bottom: 8px;
            }

            .welcome-title {
                font-size: 24px;
            }

            .stat-card, .feature-card {
                min-width: 100%;
            }
            
            body {
                padding: 16px;
            }
            
            .card {
                padding: 16px;
                margin-bottom: 16px;
            }
            
            .welcome-card {
                padding: 25px 16px;
            }
        }
        
        /* 针对小屏幕的额外调整 */
        @media (max-width: 480px) {
            .welcome-title {
                font-size: 20px;
            }
            
            .welcome-desc {
                font-size: 14px;
            }
            
            .stat-value {
                font-size: 24px;
            }
            
            .stat-label {
                font-size: 12px;
            }
            
            .feature-title {
                font-size: 14px;
            }
            
            .feature-desc {
                font-size: 12px;
            }
            
            body {
                padding: 12px;
            }
            
            .card {
                padding: 12px;
            }
        }
    </style>
</head>
<body>
    <div class="card">
        <div class="card-title">系统基本信息</div>
        <div class="card-body">
            <div class="info-row">
                <div class="info-label">当前用户：</div>
                <div class="info-value">${sessionScope.username}</div>
            </div>
            <div class="info-row">
                <div class="info-label">您的权限：</div>
                <div class="info-value">${sessionScope.cx}</div>
            </div>
            <div class="info-row">
                <div class="info-label">当前日期：</div>
                <div class="info-value">
                    <% 
                        java.util.Date date = new java.util.Date();
                        java.text.SimpleDateFormat format = new java.text.SimpleDateFormat("yyyy-MM-dd", java.util.Locale.CHINA);
                        String result = format.format(date);
                        out.print(result);
                    %>
                </div>
            </div>
            <div class="info-row">
                <div class="info-label">系统状态：</div>
                <div class="info-value" style="color: var(--success-color);">正常运行中</div>
            </div>
        </div>
    </div>

    <div class="card welcome-card">
        <div class="welcome-title">欢迎登录，黄梅戏方言语言词典系统！</div>
        <div class="welcome-desc">探索安庆地区丰富的方言文化，助力黄梅戏传承与发展</div>

        <div class="stats-container">
            <div class="stat-card">
                <div class="stat-icon">📚</div>
                <div class="stat-value">1000+</div>
                <div class="stat-label">方言词汇</div>
            </div>
            <div class="stat-card">
                <div class="stat-icon">🎭</div>
                <div class="stat-value">文化传承</div>
                <div class="stat-label">黄梅戏特色</div>
            </div>
            <div class="stat-card">
                <div class="stat-icon">👥</div>
                <div class="stat-value">多角色</div>
                <div class="stat-label">用户管理</div>
            </div>
        </div>

        <div class="features-container">
            <div class="feature-card">
                <div class="feature-icon">🔍</div>
                <div class="feature-title">方言查询</div>
                <div class="feature-desc">快速查找安庆地区各类黄梅戏词汇及其正音发音</div>
            </div>
            <div class="feature-card">
                <div class="feature-icon">🎵</div>
                <div class="feature-title">语音播放</div>
                <div class="feature-desc">听取标准的黄梅戏发音，学习正确的语音语调</div>
            </div>
            <div class="feature-card">
                <div class="feature-icon">📖</div>
                <div class="feature-title">文化资料</div>
                <div class="feature-desc">深入了解黄梅戏与方言文化的历史渊源和发展现状</div>
            </div>
        </div>
    </div>

    <script>
        // 添加交互效果
        document.addEventListener('DOMContentLoaded', function() {
            // 为统计卡片添加悬停动画
            const statCards = document.querySelectorAll('.stat-card');
            statCards.forEach(card => {
                card.addEventListener('mouseenter', function() {
                    this.style.animation = 'pulse 1s ease-in-out infinite';
                });
                card.addEventListener('mouseleave', function() {
                    this.style.animation = '';
                });
            });

            // 平滑滚动
            document.querySelectorAll('a[href^="#"]').forEach(anchor => {
                anchor.addEventListener('click', function(e) {
                    e.preventDefault();
                    const targetId = this.getAttribute('href');
                    const targetElement = document.querySelector(targetId);
                    if (targetElement) {
                        targetElement.scrollIntoView({ behavior: 'smooth' });
                    }
                });
            });
        });
    </script>
</body>
</html>

